﻿// -------------------------------------------------------------------------
//    @FileName         :    NFTransCreateRole.h
//    @Author           :    Gao.Yi
//    @Date             :    2025-08-22
//    @Email			:    445267987@qq.com
//    @Module           :    NFTransCreateRole
//    @Desc             :
//
// -------------------------------------------------------------------------

#pragma once

#include "NFTransAccBase.h"
#include "NFComm/NFObjCommon/NFObject.h"
#include "proto_cs_login.nanopb.h"

class NFTransCreateRole : public NF_OBJECT_TEMPLATE_MACRO(NFTransCreateRole, EOT_TRANS_LOGIC_CREATE_ROLE, NFTransAccBase)
public:
    NFTransCreateRole();
    ~NFTransCreateRole() override;
    int CreateInit();
    int ResumeInit();
public:
    int HandleCSMsgReq(const google::protobuf::Message *pCSMsgReq) override;
    int OnTransFinished(int iRunLogicRetCode) override;
    int HandleDispSvrRes(uint32_t nMsgId, const NFDataPackage& packet, uint32_t reqTransId, uint32_t rspTransId) override;
    int GetCacheDataRes(int ullId, int iTableId, int iReason, int32_t errCode, google::protobuf::Message* pMessage) override;
public:
    int OnHandleOnlineCreateRoleRes(uint32_t nMsgId, const NFDataPackage& packet, uint32_t reqTransId, uint32_t rspTransId);
private:
    Proto_CSCreateRoleReq m_stCreateRoleReq;
};